<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Integral extends Model
{
    use HasFactory;

    protected $guarded = [];

    /**
     * 与考试安排的关联
     */
    public function examination()
    {
        return $this->belongsTo(Examination::class, 'examination_id', 'id');
    }

    /**
     * 与用户的关联
     */
    public function user()
    {
        return $this->belongsTo(User::class,'user_id','id');
    }
}
